import request from '@/config/axios'

export interface NetSysConfigVO {
  id: number
  commId: number
  sysInterfaceUrl: string
  houseDivideFlag: boolean
  pullAccountBeforeBindFlag: boolean
  // 分账模式（0单账户 1多账户比例分账 2多账户金额分账）
  divideMode: number
  divideMatUserName1_: undefined
  divideMatId1: undefined
  divideMatCode1_: undefined
  divideMatValue1: undefined
  divideMatUserName2_: undefined
  divideMatId2: undefined
  divideMatCode2_: undefined
  divideMatValue2: undefined
  underTakeMatCode: undefined 
  underTakeMatName_: undefined
  levelIds : undefined
  levelNames: undefined
  supportSelfBindFlag: undefined
}

// 查询宽带系统配置列表
export const getNetSysConfigPage = async (params) => {
  return await request.get({ url: `/zwsj/net-sys-config/page`, params })
}

// 查询宽带系统配置详情
export const getNetSysConfigs = async () => {
  return await request.get({ url: `/zwsj/net-sys-config/list` })
}

// 查询宽带系统配置详情
export const getNetSysConfig = async (id: number) => {
  return await request.get({ url: `/zwsj/net-sys-config/get?id=` + id })
}

// 新增宽带系统配置
export const createNetSysConfig = async (data: NetSysConfigVO) => {
  return await request.post({ url: `/zwsj/net-sys-config/create`, data })
}

// 修改宽带系统配置
export const updateNetSysConfig = async (data: NetSysConfigVO) => {
  return await request.put({ url: `/zwsj/net-sys-config/update`, data })
}

// 删除宽带系统配置
export const deleteNetSysConfig = async (id: number) => {
  return await request.delete({ url: `/zwsj/net-sys-config/delete?id=` + id })
}